ID = "6666"
Emaill = "2256465465165@qq.com"
UID = "362529200207202014"
name = "王宇帆"
Pass = int(0)
a, b = 0, 0
a1, a2 = "@", ".com"
a3 = 0
# 判断ID内容
for char in ID:
    if char.isnumeric() or char.isalpha() or ord(char) == ord("_"):
        a = 1
    else:
        a = 0
        break
# 判断name内容
for char in name:
    if '\u4E00' <= char <= '\u9FFF':
        b = 1
    else:
        b = 0
        break
# 下面判断数据是否合理，合理pass为0，不合理为1，2，3，4
# 判断Id是否合理
if len(ID) == 0 or len(ID) > 8 or a == 0:
    Pass = 1
# 判断邮箱是否合理
elif a1 not in Emaill and a2 not in Emaill and not Emaill.endswith(a2, len(Emaill) - 4, len(Emaill)):
    Pass = 2
# 判断身份证是否合理
elif len(UID) != 18:
    Pass = 3
elif b == 0 or len(name) > 4:
    Pass = 4

if Pass == 0:
    print("注册成功")
    print(ID)
    print(Emaill)
    print(UID)
    print(name)
    a3 = int(UID[16:17])
    if a3==1:
        print("男")
    else:
        print("女")
elif Pass == 1:
    print("ID输入错误")
elif Pass == 2:
    print("Email输入错误")
elif Pass == 3:
    print("身份证号输入错误")
elif Pass == 4:
    print("名字输入有误")
